package CSDN.hzh22_7.test_2;

/**
 * @Description:
 * @Author: Hanzao
 * @Date: 2022/10/24 14:48
 */

import java.util.Random;

class small_match {
    public static void main(String[] args) {
        String string0 = "韩子v豪";
        String string1 = "123";
        String string2 = "123";
        String string3 = "13";
        String string4 = "123";
        for (int i = 0; i < string0.length(); i++) {
            if (string1.contains(Character.toString(string0.charAt(i)))) {
                System.out.println(1);
                break;
            } else if (string2.contains(Character.toString(string0.charAt(i)))) {
                System.out.println(2);
                break;
            } else if (string3.contains(Character.toString(string0.charAt(i)))) {
                System.out.println(3);
                break;
            } else if (string4.contains(Character.toString(string0.charAt(i)))) {
                System.out.println(4);
                break;
            } else {
                Random random = new Random();
                System.out.println("产生随机数");
//                System.out.println(random.nextInt(4) + 1);
                break;
            }
        }
    }

}
